package constructor;

public class Car {
	// state / fields / instance variables /
		private String make;
		private String model;
		int year;
		int maximumSpeed = 140;
		int currentSpeed = 65;
		String color;
		boolean hasStarted;
		
/* commenting out existing code ---
		
		Car()//Constructor with no argument
		{
			
		} */
		
		/*Car(String newMake, String newModel)// Here Car is a constructor with 2 arguments and it is like method
		{
			make = newMake;
			model = newModel;
		}*/
		
		/*Car(String newMake) //Constructor with 1 argument
		{
			make = newMake;
		}*/
		
		Car(String make, String model, int year) {
			this.model = model;
			this.make = make;
			this.year = year;
		}
		
		void start()
		{
			System.out.println(" I am starting the car");
			hasStarted = true;
			
			currentSpeed = 0;
		}
		
		void stop()
		{
		
			System.out.println(" I am stopping the car");
			hasStarted = false;
			currentSpeed = 0;
		}
			
		void changeColor(String newColor)
		{
			color = newColor;
		}
		
		// Behaviors / Methods
		int accelrate(int howMuch)
		{
			currentSpeed = currentSpeed + howMuch;
			return currentSpeed;
		} 
		
		public String getMake(){
			return make;
		}
		
		public String getModel(){
			return model;
		}

		/*public void setYear(int year){
			this.year = year;
		}*/
		
		public int getMaximumSpeed(){
			return maximumSpeed;
		}
		
		
		public int getCurrentSpeed(){
			return currentSpeed;
		}
		
		public void setCurrentSpeed(int currentSpeed){
			this.currentSpeed = currentSpeed;
		}
		
		public String getColor(){
			return color;
		}
		
		public void setColor(String color){
			this.color = color;
		}
		
		public void setStarted(boolean hasStarted) {
			this.hasStarted = hasStarted;
		}
	}
		/* commenting out existing code ---
		
		Car()//Constructor with no argument
		{
			
		}
		
		Car(String newMake, String newModel)// Here Car is a constructor with 2 arguments and it is like method
		{
			make = newMake;
			model = newModel;
		}
		
		Car(String newModel) //Constructor with 1 argument
		{
			model = newModel;
		}
		
		void start()
		{
			System.out.println(" I am starting the car");
			hasStarted = true;
			
			currentSpeed = 0;
		}
		
		void stop()
		{
		
			System.out.println(" I am stopping the car");
			hasStarted = false;
			currentSpeed = 0;
		}
			
		void changeColor(String newColor)
		{
			color = newColor;
		}
		
		// Behaviors / Methods
		int accelrate(int howMuch)
		{
			currentSpeed = currentSpeed + howMuch;
			return currentSpeed;
		} */



